package com.qcby.demo.proxyaop.proxy.star;

import com.qcby.demo.proxyaop.aop.SelfRecords;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * @className: StaticProxy
 * @description: 静态代理
 * @author: lxt
 * @create: 2021-05-12 15:26
 **/
public class StaticProxy {
    public static void main(String[] args) throws Exception {
        JiaLing jiaLing = new JiaLing();
        AgentBq agentBq = new AgentBq(jiaLing);
        agentBq.display();


//        Class clz = jiaLing.getClass();
//
//        Field[] fields = clz.getFields();
//        Field field = clz.getField("xxx");
//
//        Method[] methods = clz.getMethods();
//        Method method = clz.getMethod("xxx");
//        Method method1 = clz.getMethod("xxx",String.class);
//
//        method.invoke(jiaLing);
//        method1.invoke(jiaLing,"xxx");
//
//        Annotation[] clzAnnotations = clz.getAnnotations();
//        Annotation[] methoAnnotations = method.getAnnotations();
//        SelfRecords selfRecords = method.getAnnotation(SelfRecords.class);

    }
}
